<template>
  <el-breadcrumb class="site-breadcrumb" separator="/">
    <span class="reload" @click="reload">
      <i class="el-icon-refresh-right"></i>
    </span>
    <el-breadcrumb-item :to="{ path: '/' }">Home</el-breadcrumb-item>
    <el-breadcrumb-item v-for="(breadcrumb, index) in breadcrumbs" :key="index" :to="breadcrumb.url && { path: '/' + breadcrumb.url }">
      {{ breadcrumb.name }}
    </el-breadcrumb-item>
  </el-breadcrumb>
</template>
<script>
import { mapGetters } from "vuex";
export default {
  inject: ["reload"],
  computed: {
    ...mapGetters("menu", ["breadcrumbs"]),
  },
};
</script>
